package com.tieto.wiankowski.plyty.ejb.logic.dao;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import com.tieto.wiankowski.plyty.ejb.model.Inventory;


@Stateless
public class InventoryDaoImpl implements InventoryDao {

	@PersistenceContext
	private EntityManager entityManager;
	
	public List<Inventory> getAllInventory(){
		//return (List<Inventory>) entityManager.createNamedQuery("Inventory.findAll").getResultList() ;
		return entityManager.createQuery("from inventory i").getResultList();
	}
	
	public void creatInventory(Inventory inv){
		
	}

}
